#include <iostream>
#include "kConfiguration_c.h"
#include <time.h>
#include <stdio.h>
#include <sys/time.h>
using namespace std;

#define PR(msg) \
	{\
	time_t t = time(NULL); \
	char buf[26]; \
	ctime_r(&t,buf); \
	buf[24] = 0; \
	cout<<buf<<"@"<<__FILE__<<__LINE__<<">"<<msg<<endl;\
	}

int main(int argc,char ** argv)
{
	cout<<"main OK"<<endl;
	kConfiguration_c conf;
	conf.test();

	struct timeval tv;
	gettimeofday(&tv,NULL);
	cout<<"time of day "<<tv.tv_sec<<"."<<tv.tv_usec<<endl;

	int abc = 2;
	PR(123);
	PR(abc<<"OK");

	time_t t = time(NULL);
	char buf[26];
	ctime_r(&t,buf);
	buf[24] = 0;
	cout<<buf<<__LINE__<<__FILE__;

	struct tm *loc;
	loc = localtime(&t);
	cout<<"lc time"<< asctime(loc)<<" lc end"<<endl;

	
	printf("test % s", ctime(&t));

	time_t t2= time(NULL);
	cout<<t2-t<<endl;

	return 0;
}



